home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / ADDONINC.PAK / IOPTION.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  3.0 KB  |  94 lines

  1. /*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2.  
  3.  ioption.h
  4.  Created: 10/10/95
  5.  Copyright (c) 1995, Borland International
  6.  $Header:   Y:\admin\bride\addon\deliver\interfac\ioption.h_v   1.19   18 Nov 1996 11:29:46   JDOUGLAS  $
  7.  $Revision:   1.19  $
  8.  
  9.  OptionSet Interface
  10.    
  11.  This interface is one of several being brought forward from BC4.x IdeHook
  12.  interface. 
  13.    
  14.  Interface declared in this file:
  15.  
  16.  implemented by IDE
  17.     IOptionSetServer
  18.  
  19.  
  20.  implemented by IDE client
  21.     None
  22.  
  23.  Overview:
  24.   Client uses IOptionSetServer to manipulate a limited number of options at a
  25.   node. OptionApply() and OptionRemove() only deal with local option values
  26.   while OptionGet() deals with effective option values. An effective option
  27.   values is the resulting option value client sees at node regardless whether
  28.   the node is locally overriden.
  29.  
  30. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/  
  31. #ifndef __IOPTION_H
  32. #define __IOPTION_H
  33.  
  34. #include <ideaddon\ipolystr.h>
  35. #include <ideaddon\IOption.uid>
  36. #include <ideaddon\common.h>     // ProjectNode
  37.  
  38. //.............................................................................
  39. enum OptionsStringIds
  40. {
  41.     OID_RemoveAll = 0,      // remove all local options
  42.     OID_Include,
  43.     OID_Library,
  44.     OID_Source,
  45.     OID_Intermediate,
  46.     OID_Final,
  47.     OID_Defines,
  48.     OID_CmdlineOverride,
  49.     OID_Invalid             // not used
  50. };
  51.  
  52.  
  53. //.............................................................................
  54. class IOptionSetServer : public IUnknown
  55.  public:
  56.    //
  57.    // OptionApply() sets the node's local override for the given option.
  58.    //
  59.    // ProjectNode node     : Specifies the node to apply the option to.
  60.    // OptionsStringIds oid : Specifies the option id.
  61.    // IPolyString * value  : Specifies the new value of the option
  62.    //
  63.    virtual void BCWADDON_CMETHOD OptionApply(  ProjectNode node,
  64.                               OptionsStringIds oid,
  65.                               IPolyString * value ) = 0;
  66.  
  67.    //
  68.    //
  69.    // OptionGet() gets the node's effective option for the given option id
  70.    //
  71.    // ProjectNode node     : Specifies the node to get the option from.
  72.    // OptionsStringIds oid : Specifies the option id.
  73.    //
  74.    // 
  75.    // IDEHOOK CHANGES:
  76.    // -  The returned option string is now retrieved through the IPolyString
  77.    //    pointer.
  78.    //
  79.    virtual IPolyString * BCWADDON_CMETHOD OptionGet( ProjectNode node,
  80.                                     OptionsStringIds oid ) = 0;
  81.  
  82.    //
  83.    // OptionRemove() removes the node's local override for the given option.
  84.    //                if oid == OID_RemoveAll, this will remove all local options. 
  85.    // ProjectNode node     : Specifies the node the the option is to be removed.
  86.    // OptionsStringIds oid : Specifies the option id.
  87.    //
  88.    virtual void BCWADDON_CMETHOD OptionRemove( ProjectNode node,
  89.                               OptionsStringIds oid ) = 0;
  90. };
  91.                                        
  92. #endif      //  __IOPTION_H
  93.